<?php
namespace TwinPeaks\Core;

abstract class CStdlib
{
	use TAppInjector;
	
	const KV_STORAGE_INTERFACE = '\TwinPeaks\Stdlib\Storage\IKeyValue';
	
	/**
	 * Checks whether object implements interface
	 * 
	 * @return void
	 */
	final function checkInterface($object, $interfaceName)
	{
		if (!($object instanceof $interfaceName))
			Core\CSysException::interfaceNotImplemented($object, $interfaceName)
				->_throw();
	}
}
